package com.payment.client;

import com.payment.client.request.PaymentRequest;
import com.payment.client.response.PaymentResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@Component
@FeignClient(value = "payment")
public interface PaymentClient {

    @RequestMapping("payment/create")
    String pay(@RequestBody PaymentRequest request);

    @RequestMapping("payment/get")
    PaymentResponse get(@RequestBody PaymentRequest request);

    @RequestMapping("payment/timeout")
    PaymentResponse timeout(@RequestBody PaymentRequest request);
}
